﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using BaseLib.Helper;

namespace WebUI.Demo.Ashx
{
    /// <summary>
    /// ToDemoGetTags 的摘要说明
    /// </summary>
    public class ToDemoGetTags : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            if (string.IsNullOrWhiteSpace(context.Request.QueryString["file"])) return;
            var tags = File.ReadAllText(context.Server.MapPath("/demo/templates/" + context.Request.QueryString["file"]));
            context.Response.ContentType = "text/plain";
            context.Response.Write(tags);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}